<nz-modal [(nzVisible)]="Visible" [nzWidth]="width" [nzTitle]="popTitle" (nzOnCancel)="Cancel()" (nzOnOk)="Ok()">
    <div *ngIf="operaType === 'add' || operaType === 'edit'">
        <div class="gzxmWrap">
            <div class="title">
                <span class="fl">工作项目 *</span>
                <button *ngIf="gzxmList.length > 3" class="fr mt6" nz-button nzType="default" (click)="detail()"><i
                        nz-icon nzType="profile"></i>{{detailObj.text}}</button>
            </div>
            <nz-checkbox-wrapper class="wd" (nzOnChange)="gzxmChange($event)">
                <div [ngClass]="detailObj.class" nz-row>
                    <div *ngFor="let item of gzxmList" class="list" nz-col nzSpan="7"><label nz-checkbox
                            [nzValue]="item.code" [(ngModel)]="item.checked">{{item.name}}</label></div>
                </div>
            </nz-checkbox-wrapper>
        </div>
        <nz-descriptions nzBordered nzSize="small">
            <nz-descriptions-item nzTitle="检查部门 *" [nzSpan]="2">
                <nz-tree-select class="wd" nzShowSearch [nzDropdownStyle]="treeNodeStyle" nzPlaceHolder="请选择检查部门"
                    [nzNodes]="jcbmNodes" [(ngModel)]="operaData.checkOrgId">
                </nz-tree-select>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="检查时间 *" [nzSpan]="2">
                <nz-date-picker class="wd" [(ngModel)]="operaData.checkDate"></nz-date-picker>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="检查地点 *" [nzSpan]="2">
                <input nz-input placeholder="请输入检查地点" [(ngModel)]="operaData.checkPlace" (input)="jcddInput($event)"
                    [nzAutocomplete]="auto" />
                <nz-autocomplete [nzDataSource]="jcddAutoData" nzBackfill #auto></nz-autocomplete>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="检查人 *" [nzSpan]="2">
                <input nz-input placeholder="请输入检查人" [(ngModel)]="operaData.checkPerson" />
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="问题描述 *" [nzSpan]="3">
                <textarea nz-input placeholder="请输入问题描述" [(ngModel)]="operaData.problemDesc"
                    [nzAutosize]="{ minRows: 2, maxRows: 2 }"></textarea>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="整改要求 *" [nzSpan]="3">
                <textarea nz-input placeholder="请输入整改要求" [(ngModel)]="operaData.handleRequire"
                    [nzAutosize]="{ minRows: 2, maxRows: 2 }"></textarea>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="责任部门 *" [nzSpan]="2">
                <nz-tree-select class="wd" [nzDisabled]="operaType === 'edit'" nzShowSearch
                    [nzDropdownStyle]="treeNodeStyle" nzPlaceHolder="请选择责任部门" [nzNodes]="zrbmNodes"
                    [(ngModel)]="operaData.chargeOrgId">
                </nz-tree-select>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="问题类别 *" [nzSpan]="2">
                <nz-select class="wd" nzPlaceHolder="请选择问题类别" [compareWith]="wtlbCompareFn"
                    [(ngModel)]="operaData.typeId">
                    <nz-option *ngFor="let item of wtlbNodes" [nzValue]="item" [nzLabel]="item.name"></nz-option>
                </nz-select>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="问题分类 *" [nzSpan]="2">
                <nz-select class="wd" nzPlaceHolder="请选择问题分类" [compareWith]="wtlbCompareFn"
                    [(ngModel)]="operaData.problemClass">
                    <nz-option *ngFor="let item of wtflNodes" [nzValue]="item" [nzLabel]="item.name"></nz-option>
                </nz-select>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="问题等级 *" [nzSpan]="2">
                <nz-select class="wd" (ngModelChange)="problemLevelChange($event)" nzPlaceHolder="请选择问题等级"
                    [compareWith]="wtlbCompareFn" [(ngModel)]="operaData.problemLevel">
                    <nz-option *ngFor="let item of wtdjNodes" [nzValue]="item" [nzLabel]="item.name"></nz-option>
                </nz-select>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="整改时限 *" [nzSpan]="2">
                <nz-date-picker nzDisabled class="wd" (ngModelChange)="deadlineChange($event)"
                    [(ngModel)]="operaData.deadline">
                </nz-date-picker>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="设备类型" [nzSpan]="2">
                <nz-tree-select class="wdh" (ngModelChange)="czChange($event)" nzShowSearch
                    [nzDropdownStyle]="treeNodeStyle" nzPlaceHolder="请选择车站" [nzNodes]="czNodes"
                    [(ngModel)]="operaData.stationId">
                </nz-tree-select>
                <nz-tree-select class="wdh" (ngModelChange)="lxChange($event)" nzShowSearch
                    [nzDropdownStyle]="treeNodeStyle" nzPlaceHolder="先选车站再选类型" [nzNodes]="sblxNodes"
                    [(ngModel)]="operaData.devTypeCode">
                </nz-tree-select>
            </nz-descriptions-item>

            <nz-descriptions-item nzTitle="设备名称" [nzSpan]="3">
                <nz-select nzPlaceHolder="请先选设备类型，再选设备名称（可多选）" nzShowSearch [(ngModel)]="operaData.devId"
                    nzMode="multiple" class="wd">
                    <nz-option *ngFor="let data of sbmcNodes" [nzValue]="data.ID" [nzLabel]="data.VC_NAME">
                        {{data.VC_NAME}}</nz-option>
                </nz-select>
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="备注" [nzSpan]="3">
                <textarea nz-input placeholder="请输入备注" [(ngModel)]="operaData.remark"
                    [nzAutosize]="{ minRows: 2, maxRows: 2 }"></textarea>
            </nz-descriptions-item>
        </nz-descriptions>
    </div>
    <div *ngIf="operaType === 'del'">
        确定要{{popTitle}}这 <span style="font-weight:bold;color:#ff0000">{{thisData.count}}</span> 条数据吗？
    </div>
    <div *ngIf="operaType === 'tb' || operaType === 'aqktb'">
        部门：
        <nz-select class="wdh" nzPlaceHolder="请选择部门" [compareWith]="tbzrbmCompareFn" [(ngModel)]="operaData.tbOrgId">
            <nz-option *ngFor="let item of tbzrbmNodes" [nzValue]="item" [nzLabel]="item.NAME"></nz-option>
        </nz-select>
    </div>
    <div *ngIf="operaType === 'xf'">
        部门：
        <nz-select class="wdh" nzPlaceHolder="请选择部门" [compareWith]="tbzrbmCompareFn" [(ngModel)]="operaData.xfOrgId">
            <nz-option *ngFor="let item of xfzrbmNodes" [nzValue]="item" [nzLabel]="item.NAME"></nz-option>
        </nz-select>
    </div>
    <div *ngIf="operaType === 'qs' || operaType === 'sqxh'">
        确定要{{popTitle}}这条数据吗？
    </div>
    <div *ngIf="operaType === 'wcrw'">
        确定要完成这条数据吗？
    </div>
    <div *ngIf="operaType === 'zyhk'">
        确定要将这条数据转到隐患库吗？
    </div>
    <div *ngIf="operaType === 'pz' || operaType === 'aqkpz' || operaType === 'bh' || 
        operaType === 'aqkbh' || operaType === 'tyyq' || operaType === 'bhyq'">
        <nz-descriptions nzBordered nzSize="small">
            <nz-descriptions-item nzTitle="问题信息" [nzSpan]="3">{{wtxxInfo}}</nz-descriptions-item>
            <nz-descriptions-item nzTitle="责任部门" [nzSpan]="3">{{zrbmInfo}}</nz-descriptions-item>
        </nz-descriptions>
        <textarea style="margin-top:20px" nz-input [placeholder]="'请输入'+popTitle+'审批意见'" [(ngModel)]="operaData.yj"
            [nzAutosize]="{ minRows: 5, maxRows: 5 }"></textarea>
    </div>
    <div *ngIf="operaType === 'zgwt'">
        <textarea nz-input [placeholder]="'请输入'+popTitle+'整改内容'" [(ngModel)]="operaData.zgwt"
            [nzAutosize]="{ minRows: 5, maxRows: 5 }"></textarea>
    </div>
    <div *ngIf="operaType === 'sqyq'">
        延期日期：
        <nz-date-picker [(ngModel)]="operaData.sqyq"></nz-date-picker>
    </div>
</nz-modal>